<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>商品列表</title>
    <style>
        table {
            border-collapse: collapse;
            width: 80%;
            margin: 20px auto;
        }
        th, td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: left;
        }
        th {
            background-color: #f2f2f2;
        }
    </style>
</head>
<body>
<h1 style="text-align: center;">商品列表</h1>
<table>
    <thead>
    <tr>
        <th>ID</th>
        <th>商品名称</th>
        <th>价格</th>
        <th>描述</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="goods : ${goods}">
        <td th:text="${goods.id}"></td>
        <td th:text="${goods.name}"></td>
        <td th:text="${goods.price}"></td>
        <td th:text="${goods.description}"></td>
    </tr>
    </tbody>
</table>
</body>
</html>